<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简单的JS</title>
</head>
<body>
    <p>请输入您的姓名：</p>
    <input type="text" id="name"></input>
    <button onclick="greetUser()">问好</button>
    <p id="greeting"></p>
    <script src="4.js"></script>
</body>
</html>